package com.wyf.exceptions;

import lombok.Data;


/**
 * 自定义异常： 业务异常
 */

@Data
public class BusinessException extends RuntimeException {
    private Integer code = 400;
    private String msg = "业务异常";

    public BusinessException() {
        super("业务异常！");
    }

    public BusinessException(Integer code) {
        super("业务异常！");
        this.code = code;
    }

    public BusinessException(String msg) {
        super("业务异常！");
        this.msg = msg;
    }

    public BusinessException(Integer code, String msg) {
        super("业务异常！");
        this.code = code;
        this.msg = msg;
    }
}
